.class Lcom/estrongs/fs/impl/usb/f$c;
.super Ljava/lang/Object;
.source "UsbMassStorageDevice.java"

# interfaces
.implements Lcom/estrongs/fs/impl/usb/a;


# annotations
.annotation build Landroid/annotation/TargetApi;
    value = 0x12
.end annotation

.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/estrongs/fs/impl/usb/f;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "c"
.end annotation


# instance fields
.field private a:I

.field final synthetic b:Lcom/estrongs/fs/impl/usb/f;


# direct methods
.method public constructor <init>(Lcom/estrongs/fs/impl/usb/f;I)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    invoke-static {}, Lcom/estrongs/fs/impl/usb/f;->j()I

    move-result p1

    iput p1, p0, Lcom/estrongs/fs/impl/usb/f$c;->a:I

    .line 3
    iput p2, p0, Lcom/estrongs/fs/impl/usb/f$c;->a:I

    return-void
.end method


# virtual methods
.method public a([BI)I
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 6
    iget-object v0, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v0}, Lcom/estrongs/fs/impl/usb/f;->a(Lcom/estrongs/fs/impl/usb/f;)Ljava/lang/Object;

    move-result-object v0

    monitor-enter v0

    .line 7
    :try_start_0
    iget-object v1, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v1}, Lcom/estrongs/fs/impl/usb/f;->b(Lcom/estrongs/fs/impl/usb/f;)Z

    move-result v1

    if-nez v1, :cond_0

    iget-object v1, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v1}, Lcom/estrongs/fs/impl/usb/f;->c(Lcom/estrongs/fs/impl/usb/f;)Landroid/hardware/usb/UsbDeviceConnection;

    move-result-object v1

    if-eqz v1, :cond_0

    .line 8
    iget-object v1, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v1}, Lcom/estrongs/fs/impl/usb/f;->c(Lcom/estrongs/fs/impl/usb/f;)Landroid/hardware/usb/UsbDeviceConnection;

    move-result-object v1

    iget-object v2, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v2}, Lcom/estrongs/fs/impl/usb/f;->e(Lcom/estrongs/fs/impl/usb/f;)Landroid/hardware/usb/UsbEndpoint;

    move-result-object v2

    iget v3, p0, Lcom/estrongs/fs/impl/usb/f$c;->a:I

    invoke-virtual {v1, v2, p1, p2, v3}, Landroid/hardware/usb/UsbDeviceConnection;->bulkTransfer(Landroid/hardware/usb/UsbEndpoint;[BII)I

    move-result p1

    monitor-exit v0

    return p1

    .line 9
    :cond_0
    new-instance p1, Ljava/io/IOException;

    const-string p2, "Device is removed"

    invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p1

    :catchall_0
    move-exception p1

    .line 10
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method public a([BII)I
    .locals 8
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    iget-object v0, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v0}, Lcom/estrongs/fs/impl/usb/f;->a(Lcom/estrongs/fs/impl/usb/f;)Ljava/lang/Object;

    move-result-object v0

    monitor-enter v0

    .line 2
    :try_start_0
    iget-object v1, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v1}, Lcom/estrongs/fs/impl/usb/f;->b(Lcom/estrongs/fs/impl/usb/f;)Z

    move-result v1

    if-nez v1, :cond_0

    iget-object v1, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v1}, Lcom/estrongs/fs/impl/usb/f;->c(Lcom/estrongs/fs/impl/usb/f;)Landroid/hardware/usb/UsbDeviceConnection;

    move-result-object v1

    if-eqz v1, :cond_0

    .line 3
    iget-object v1, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v1}, Lcom/estrongs/fs/impl/usb/f;->c(Lcom/estrongs/fs/impl/usb/f;)Landroid/hardware/usb/UsbDeviceConnection;

    move-result-object v2

    iget-object v1, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v1}, Lcom/estrongs/fs/impl/usb/f;->d(Lcom/estrongs/fs/impl/usb/f;)Landroid/hardware/usb/UsbEndpoint;

    move-result-object v3

    iget v7, p0, Lcom/estrongs/fs/impl/usb/f$c;->a:I

    move-object v4, p1

    move v5, p2

    move v6, p3

    invoke-virtual/range {v2 .. v7}, Landroid/hardware/usb/UsbDeviceConnection;->bulkTransfer(Landroid/hardware/usb/UsbEndpoint;[BIII)I

    move-result p1

    monitor-exit v0

    return p1

    .line 4
    :cond_0
    new-instance p1, Ljava/io/IOException;

    const-string p2, "Device is removed"

    invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p1

    :catchall_0
    move-exception p1

    .line 5
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method public b([BI)I
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    iget-object v0, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v0}, Lcom/estrongs/fs/impl/usb/f;->a(Lcom/estrongs/fs/impl/usb/f;)Ljava/lang/Object;

    move-result-object v0

    monitor-enter v0

    .line 2
    :try_start_0
    iget-object v1, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v1}, Lcom/estrongs/fs/impl/usb/f;->b(Lcom/estrongs/fs/impl/usb/f;)Z

    move-result v1

    if-nez v1, :cond_0

    iget-object v1, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v1}, Lcom/estrongs/fs/impl/usb/f;->c(Lcom/estrongs/fs/impl/usb/f;)Landroid/hardware/usb/UsbDeviceConnection;

    move-result-object v1

    if-eqz v1, :cond_0

    .line 3
    iget-object v1, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v1}, Lcom/estrongs/fs/impl/usb/f;->c(Lcom/estrongs/fs/impl/usb/f;)Landroid/hardware/usb/UsbDeviceConnection;

    move-result-object v1

    iget-object v2, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v2}, Lcom/estrongs/fs/impl/usb/f;->d(Lcom/estrongs/fs/impl/usb/f;)Landroid/hardware/usb/UsbEndpoint;

    move-result-object v2

    iget v3, p0, Lcom/estrongs/fs/impl/usb/f$c;->a:I

    invoke-virtual {v1, v2, p1, p2, v3}, Landroid/hardware/usb/UsbDeviceConnection;->bulkTransfer(Landroid/hardware/usb/UsbEndpoint;[BII)I

    move-result p1

    monitor-exit v0

    return p1

    .line 4
    :cond_0
    new-instance p1, Ljava/io/IOException;

    const-string p2, "Device is removed"

    invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p1

    :catchall_0
    move-exception p1

    .line 5
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method

.method public b([BII)I
    .locals 8
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 6
    iget-object v0, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v0}, Lcom/estrongs/fs/impl/usb/f;->a(Lcom/estrongs/fs/impl/usb/f;)Ljava/lang/Object;

    move-result-object v0

    monitor-enter v0

    .line 7
    :try_start_0
    iget-object v1, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v1}, Lcom/estrongs/fs/impl/usb/f;->b(Lcom/estrongs/fs/impl/usb/f;)Z

    move-result v1

    if-nez v1, :cond_0

    iget-object v1, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v1}, Lcom/estrongs/fs/impl/usb/f;->c(Lcom/estrongs/fs/impl/usb/f;)Landroid/hardware/usb/UsbDeviceConnection;

    move-result-object v1

    if-eqz v1, :cond_0

    .line 8
    iget-object v1, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v1}, Lcom/estrongs/fs/impl/usb/f;->c(Lcom/estrongs/fs/impl/usb/f;)Landroid/hardware/usb/UsbDeviceConnection;

    move-result-object v2

    iget-object v1, p0, Lcom/estrongs/fs/impl/usb/f$c;->b:Lcom/estrongs/fs/impl/usb/f;

    invoke-static {v1}, Lcom/estrongs/fs/impl/usb/f;->e(Lcom/estrongs/fs/impl/usb/f;)Landroid/hardware/usb/UsbEndpoint;

    move-result-object v3

    iget v7, p0, Lcom/estrongs/fs/impl/usb/f$c;->a:I

    move-object v4, p1

    move v5, p2

    move v6, p3

    invoke-virtual/range {v2 .. v7}, Landroid/hardware/usb/UsbDeviceConnection;->bulkTransfer(Landroid/hardware/usb/UsbEndpoint;[BIII)I

    move-result p1

    monitor-exit v0

    return p1

    .line 9
    :cond_0
    new-instance p1, Ljava/io/IOException;

    const-string p2, "Device is removed"

    invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p1

    :catchall_0
    move-exception p1

    .line 10
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p1
.end method
